home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / opengldoc / glspec / texture4D.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  9.9 KB  |  273 lines

  1. XXX - not complete yet!
  2.  
  3. Name
  4.  
  5.     SGIS_texture4D
  6.  
  7. Name Strings
  8.  
  9.     GL_SGIS_texture4D
  10.  
  11. Version
  12.  
  13.     $Date: 1996/04/02 00:09:00 $ $Revision: 1.2 $
  14.  
  15. Number
  16.  
  17.     16
  18.  
  19. Dependencies
  20.  
  21.     EXT_abgr affects the definition of this extension
  22.     EXT_texture is required
  23.     EXT_texture3D is required
  24.     EXT_subtexture affects the definition of this extension
  25.  
  26. Overview
  27.  
  28.     This extension defines 4-dimensional texture mapping.  If EXT_subtexture
  29.     is supported, this extension also defines a mechanism to redefine a
  30.     portion of an existing 4-dimensional texture image.  Because
  31.     EXT_texture3D is required, this extension utilizes the 3-dimensional
  32.     image support defined in by EXT_texture3D as a base for 4-dimensional
  33.     image manipulation.
  34.  
  35.     Four-dimensional texture mapping is more constrained than its one, two,
  36.     and three-dimensional counterparts.  Mipmapping is not supported, so
  37.     only the level-zero 4-dimensional texture image can be defined.  Cubic
  38.     filtering is not supported, so the border width must be either zero or
  39.     one.
  40.  
  41.     Four-dimensional textures are used primarily as color lookup tables for
  42.     color conversion.
  43.  
  44. New Procedures and Functions
  45.  
  46.     void TexImage4DSGIS(enum target,
  47.                 int level,
  48.                 enum internalformat,
  49.                 sizei width,
  50.                 sizei height,
  51.                 sizei depth,
  52.                 sizei size4d,
  53.                 int border,
  54.                 enum format,
  55.                 enum type,
  56.                 const void* pixels);
  57.  
  58.     void TexSubImage4DSGIS(enum target,
  59.                 int level,
  60.                int xoffset,
  61.                 int yoffset,
  62.                int zoffset,
  63.                int woffset,
  64.                sizei width,
  65.                sizei height,
  66.                sizei depth,
  67.                sizei size4d,
  68.                enum format,
  69.                enum type,
  70.                const void* pixels);
  71.  
  72. New Tokens
  73.  
  74.     Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  75.     GetFloatv, and GetDoublev, and by the <pname> parameter of PixelStore:
  76.  
  77.     PACK_SKIP_VOLUMES_SGIS
  78.     PACK_IMAGE_DEPTH_SGIS
  79.     UNPACK_SKIP_VOLUMES_SGIS
  80.     UNPACK_IMAGE_DEPTH_SGIS
  81.  
  82.     Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
  83.     the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
  84.     GetDoublev, and by the <target> parameter of TexImage4DSGIS, GetTexImage,
  85.     GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and
  86.     GetTexParameterfv:
  87.  
  88.     TEXTURE_4D_SGIS
  89.  
  90.     Accepted by the <target> parameter of TexImage4DSGIS,
  91.     GetTexLevelParameteriv, and GetTexLevelParameterfv:
  92.  
  93.     PROXY_TEXTURE_4D_SGIS
  94.  
  95.     Accepted by the <pname> parameter of GetTexLevelParameteriv and
  96.     GetTexLevelParameterfv:
  97.  
  98.     TEXTURE_4DSIZE_SGIS
  99.  
  100.     Accepted by the <pname> parameter of TexParameteriv, TexParameterfv,
  101.     GetTexParameteriv, and GetTexParameterfv:
  102.  
  103.     TEXTURE_WRAP_Q_SGIS
  104.  
  105.     Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  106.     GetFloatv, and GetDoublev:
  107.  
  108.     MAX_4D_TEXTURE_SIZE_SGIS
  109.  
  110.  
  111. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  112.  
  113.     None
  114.  
  115. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  116.  
  117.     XXX - not written yet.  Be sure to handle the null image case.
  118.  
  119. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  120. and the Framebuffer)
  121.  
  122.     None
  123.  
  124. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  125.  
  126.     None
  127.  
  128. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  129.  
  130.     4-dimensional texture images are queried using GetTexImage with its
  131.     <target> parameter set to TEXTURE_4D_SGIS.  The assignment of texel
  132.     component values to the initial R, G, B, and A components of a pixel
  133.     group is described in EXT_texture.  Pixel transfer and pixel storage
  134.     operations are applied as if the image were 3-dimensional, except that
  135.     the additional pixel storage state values PACK_IMAGE_DEPTH_SGIS and
  136.     PACK_SKIP_VOLUMES_SGIS affect the storage of the image into memory.  The
  137.     correspondence of texels to memory locations is as defined for
  138.     TexImage4DSGIS above, substituting PACK* state for UNPACK* state in all
  139.     occurrences.
  140.  
  141. Additions to the GLX Specification
  142.  
  143.     None
  144.  
  145. Dependencies on EXT_abgr
  146.  
  147.     If EXT_abgr is supported, the <format> parameter of TexImage4DSGIS
  148.     accepts ABGR_EXT.  Otherwise it does not.
  149.  
  150. Dependencies on EXT_texture
  151.  
  152.     EXT_texture is required.  All of the <components> tokens defined by
  153.     EXT_texture are accepted by the <internalformat> parameter of
  154.     TexImage4DSGIS, with the same semantics that are defined by EXT_texture.
  155.  
  156.     The query and error extensions defined by EXT_texture are extended in
  157.     this document.
  158.  
  159. Dependencies on EXT_texture3D
  160.  
  161.     EXT_texture3D is required, because the 3-dimensional image support that
  162.     it defines is used by this extension, and because it doesn't make sense
  163.     to support 4D textures if 3D textures are not supported.
  164.  
  165. Dependencies on EXT_subtexture
  166.  
  167.     If EXT_subtexture is not supported, this extension does not define
  168.     TexSubImage4DSGIS.  All discussion of replacing a subset of the image of
  169.     an existing 4-dimensional texture is void.
  170.  
  171. Errors
  172.  
  173.     INVALID_ENUM is generated if TexImage4DSGIS parameter <target> is not
  174.     TEXTURE_4D_SGIS.
  175.  
  176.     INVALID_VALUE is generated if TexImage4DSGIS parameter <level> is less
  177.     than zero.
  178.  
  179.     INVALID_ENUM is generated if TexImage4DSGIS parameter <internalformat> is
  180.     not ALPHA, RGB, RGBA, LUMINANCE, LUMINANCE_ALPHA, or one of the tokens
  181.     defined by the EXT_texture extension.  (Values 1, 2, 3, and 4 are not
  182.     accepted as internal formats by TexImage4DSGIS).
  183.  
  184.     INVALID_VALUE is generated if TexImage4DSGIS parameter <width>, <height>,
  185.     or <depth> is less than zero, or cannot be represented as
  186.     2**k + 2*border for some integer k.
  187.  
  188.     INVALID_VALUE is generated if TexImage4DSGIS parameter <border> is not 0
  189.     or 1.
  190.  
  191.     INVALID_ENUM is generated if TexImage4DSGIS parameter <format> is not
  192.     COLOR_INDEX, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or
  193.     LUMINANCE_ALPHA (or ABGR_EXT if EXT_abgr is supported).
  194.  
  195.     INVALID_ENUM is generated if TexImage4DSGIS parameter <type> is not
  196.     UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT.
  197.  
  198.     INVALID_OPERATION is generated if TexImage4DSGIS is called between
  199.     execution of Begin and the corresponding execution of End.
  200.  
  201.     TEXTURE_TOO_LARGE_SGI is generated if the texture as specified cannot be
  202.     accommodated by the implementation.  This error will not occur if none
  203.     of <width>, <height>, or <depth> is greater than MAX_4D_TEXTURE_SIZE_SGIS.
  204.  
  205.     INVALID_ENUM is generated by TexSubImage4DSGIS if its <target> parameter
  206.     is not TEXTURE_4D_SGIS.
  207.  
  208.     INVALID_VALUE is generated by TexSubImage4DSGIS if the specified texture
  209.     array has not been defined by a previous TexImage4DSGIS operation.
  210.  
  211.     INVALID_VALUE is generated if TexSubImage4DSGIS parameter <level> is not
  212.     equal to zero.
  213.  
  214.     INVALID_VALUE is generated if TexSubImage4DSGIS parameter <width>,
  215.     <height>, <depth>, or <size4d> is negative.
  216.     
  217.     INVALID_VALUE is generated if TexSubImage4DSGIS parameter <xoffset>,
  218.     <yoffset>, <zoffset>, or <woffset> is less than -TEXTURE_BORDER.
  219.  
  220.     INVALID_VALUE is generated by TexSubImage4DSGIS if
  221.     (xoffset + width) > (TEXTURE_WIDTH - TEXTURE_BORDER), or if
  222.     (yoffset + height) > (TEXTURE_HEIGHT - TEXTURE_BORDER), or if
  223.     (zoffset + depth) > (TEXTURE_DEPTH_EXT - TEXTURE_BORDER), or if
  224.     (woffset + size4d) > (TEXTURE_4DSIZE_SGIS - TEXTURE_BORDER).
  225.  
  226.     INVALID_ENUM is generated if TexSubImage4DSGIS parameter <format> is not
  227.     COLOR_INDEX, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or
  228.     LUMINANCE_ALPHA (or ABGR_EXT if EXT_abgr is supported).
  229.  
  230.     INVALID_ENUM is generated if TexSubImage4DSGIS parameter <type> is not
  231.     UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT.
  232.  
  233.     INVALID_OPERATION is generated if TexSubImage4DSGIS is called between
  234.     execution of Begin and the corresponding execution of End.
  235.  
  236. New State
  237.  
  238.     Get Value                Get Command        Type            Initial Value        Attribute
  239.     ---------                -----------        ----            -------------        ---------
  240.     UNPACK_SKIP_VOLUMES_SGIS        GetIntegerv        Z+            0                -
  241.     UNPACK_IMAGE_DEPTH_SGIS        GetIntegerv        Z+            0                -
  242.     PACK_SKIP_VOLUMES_SGIS        GetIntegerv        Z+            0                -
  243.     PACK_IMAGE_DEPTH_SGIS        GetIntegerv        Z+            0                -
  244.     TEXTURE_4D_SGIS            IsEnabled        B            FALSE            texture/enable
  245.     TEXTURE_WRAP_Q_SGIS            GetTexParameteriv    1 x Z2            REPEAT            texture
  246.     TEXTURE_4DSIZE_SGIS            GetTexLevelParameteriv    1 x 2 x Z+        0                -
  247.  
  248.     TEXTURE                GetTexImage        4 x 1 x levels x I    null                -
  249.     TEXTURE_RED_SIZE_EXT        GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  250.     TEXTURE_GREEN_SIZE_EXT        GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  251.     TEXTURE_BLUE_SIZE_EXT        GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  252.     TEXTURE_ALPHA_SIZE_EXT        GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  253.     TEXTURE_LUMINANCE_SIZE_EXT        GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  254.     TEXTURE_INTENSITY_SIZE_EXT        GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  255.     TEXTURE_WIDTH            GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  256.     TEXTURE_HEIGHT            GetTexLevelParameteriv    3 x 2 x levels x Z+    0                -
  257.     TEXTURE_DEPTH_EXT            GetTexLevelParameteriv    2 x 2 x levels x Z+    0                -
  258.     TEXTURE_BORDER            GetTexLevelParameteriv    4 x 2 x levels x Z+    0                -
  259.     TEXTURE_COMPONENTS (1D and 2D)    GetTexLevelParameteriv    2 x 2 x levels x Z42    1                -
  260.     TEXTURE_COMPONENTS (3D and 4D)    GetTexLevelParameteriv    2 x 2 x levels x Z38    LUMINANCE            -
  261.     TEXTURE_BORDER_COLOR        GetTexParameteriv    4 x C            0, 0, 0, 0        texture
  262.     TEXTURE_MIN_FILTER            GetTexParameteriv    4 x Z7            NEAREST_MIPMAP_LINEAR    texture
  263.     TEXTURE_MAG_FILTER            GetTexParameteriv    4 x Z3            LINEAR            texture
  264.     TEXTURE_WRAP_S            GetTexParameteriv    4 x Z2            REPEAT            texture
  265.     TEXTURE_WRAP_T            GetTexParameteriv    3 x Z2            REPEAT            texture
  266.     TEXTURE_WRAP_R_EXT            GetTexParameteriv    2 x Z2            REPEAT            texture
  267.  
  268. New Implementation Dependent State
  269.  
  270.     Get Value            Get Command    Type        Minimum Value
  271.     ---------            -----------    ----        -------------
  272.     MAX_4D_TEXTURE_SIZE_SGIS    GetIntegerv    Z+        16
  273.